import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);
export default new Vuex.Store({
  state: {
    headFlag: true// 控制头部导航是否显示
  },
  mutations: {
    changeNavFlag (state, flag) { //改变导航栏状态
      state.headFlag = flag;
    }
  },
  actions: {
    navFlagAction ({ commit }, flag) {
      commit("changeNavFlag", flag)
    }
  },
  getters: {
    headFlag: state => state.headFlag
  },
  modules: {}
});
